<template>
  <div class="box">
    <div class="box_vodeo" v-if="details.video">
      <video :src="details.video" controls="controls"></video>
    </div>
    <div class="box_title">
      {{details.title}}
    </div>
    <div class="box_time overflowEllipsis">
      {{details.createTime | baseTimeSplitFun}} {{details.publisher}}
    </div>
    <div class="box_txt" v-html="details.conetnt">

    </div>
  </div>
</template>
<script>
import taskApi from "../../requestApi/taskApi";
import { Toast } from "mint-ui";
export default {
  components: {},
  data() {
    return {
      details: {}
    };
  },
  created: function() {},
  mounted() {
    let self = this;
    self.baseUserMessageDistributeFun();
    window.getAppgetUserToken = function(val) {
      self.baseUserInfoFun(val);
      self.listFun();
    };

    this.titleFun({
      title: "党群新闻"
    });
  },
  methods: {
    async listFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApipartynewsinfo(params);
      if (res.statusCode == 200) {
        self.details = {
          ...res.data
        };
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    }
  },
  filters: {},
  watch: {},
  computed: {}
};
</script>
<style scoped>
.box_vodeo {
  height: 6.6933rem;
  width: 100%;
  border: 0.0267rem solid #ccc;
}
.box_vodeo video {
  width: 100%;
  height: 6.6933rem;
  background-color: black;
}
.box_txt {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  margin-top: 0.56rem;
  margin-bottom: 1.0933rem;
  overflow: hidden;
  font-size: 0.3733rem;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  line-height: 0.5867rem;
}
.box_time {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  margin-top: 0.3733rem;
  font-size: 0.32rem;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: rgba(153, 153, 153, 1);
  height: 0.48rem;
  line-height: 0.48rem;
  margin-top: 0.32rem;
  text-align: center;
}
.box_title {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  min-height: 0.5867rem;
  line-height: 0.5867rem;
  font-size: 0.4533rem;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  margin-top: 0.4rem;
  text-align: center;
}
.box {
  background: #fff;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
}
</style>